<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>z-index</title>
     <style>
        .s {
            width: 150px;
            height: 200px;
            display: inline-block;
            border: 1px solid grey;
            background-color:white;
            position: relative;
            z-index: 1;
            transition: all 0.1s linear 0s;
        }
        .s:hover {
            border: 2px solid red;
            z-index: 2; 
        }
    </style>
</head>
<body>
    <div class="f">
        <div class="s"></div><div class="s"></div><div class="s"></div><div class="s"></div><div class="s"></div><div class="s"></div>
    </div>
</body>
</html>